# Maintainer: atom2013 <atom.long@hotmail.com>

pkgbase=python-six
pkgname=('python2-six' 'python3-six')
pkgver=1.13.0
pkgrel=1
pkgdesc="Python 2 and 3 compatibility utilities"
arch=('any')
url="https://pypi.python.org/pypi/six/"
license=('MIT')
makedepends=('python3-setuptools' 'python2-setuptools')
source=("https://pypi.io/packages/source/s/six/six-${pkgver}.tar.gz")
sha256sums=('30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66')

build() {
  cp -a six-$pkgver{,-py2}
}

check() {
  cd "$srcdir"/six-$pkgver
  py.test

  cd "$srcdir"/six-$pkgver-py2
  py.test2
}

package_python3-six() {
  depends=('python3')

  cd six-${pkgver}
  python3 setup.py install --root "${pkgdir}" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
}

package_python2-six() {
  depends=('python2')

  cd six-${pkgver}-py2
  python2 setup.py install --root "${pkgdir}" --optimize=1
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
